<template>
  <div class="cinemalist">
    <div class="back">
      <span class="iconfont" @click="back">&#xe613;</span>
    </div>
    <ul class="list">
      <li class="info" v-for="item in allData" :key="item.id">
        <div class="desc">
          <p class="name-price">
            <span class="name one-line">{{item.nm}}</span>
            <span class="sell-price">
              <span class="price">{{item.sellPrice}}</span> 元起
            </span>
          </p>
          <p class="address one-line">{{item.addr}}</p>
          <p class="feature-tags">
            <span>座</span>
            <span v-if="item.allowRefund">退</span>
            <span v-if="item.endorse">改签</span>
            <span v-for="(i,index) in item.hallType" :key="index">{{i}}</span>
            <span class="featrue">小吃</span>
          </p>
        </div>
        <div class="distance">1.1km</div>
      </li>
    </ul>
  </div>
</template>
<script>
export default {
  data() {
    return {
      allData: []
    };
  },
  created() {
    this.allData = JSON.parse(sessionStorage.getItem("data")).list;
  },
  mounted() {
    $(".navBar").css({ "z-index": 10 });
  },
  methods: {
    back() {
      this.$router.back("/search");
    }
  }
};
</script>

<style scoped lang ='scss'>
.cinemalist {
  margin-top: 1rem;
  .back {
    position: fixed;
    top: 0.22rem;
    left: 0.16rem;
    z-index: 20;
    span {
      font-size: 0.48rem;
    }
    color: white;
  }
  .list {
    font-size: 0.28rem;
    color: #777;
    width: 100%;
    min-height: 8rem;
    padding-left: 0.3rem;
    border-top: 1px solid #e6e6e6;

    .info {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0.3rem 0.3rem 0.3rem 0;
      border-bottom: 1px solid #e6e6e6;
      .desc {
        flex: 1;
        overflow: hidden;
        .name-price {
          font-size: 0.32rem;
          color: #000;
          margin-bottom: 0.12rem;
          display: flex;
          .name {
            max-width: 4.7rem;
            white-space: nowrap;
            text-overflow: ellipsis;
            overflow: hidden;
          }
          .sell-price {
            font-size: 0.22rem;
            color: #999;
            white-space: nowrap;
            margin-left: 0.2rem;
            .price {
              font-size: 0.34rem;
              color: #ef4238;
            }
          }
        }
        .address {
          font-size: 0.26rem;
          color: #999;
          max-width: 6.14rem;
          white-space: nowrap;
          text-overflow: ellipsis;
          overflow: hidden;
        }
        .feature-tags {
          margin-top: 0.14rem;
          display: flex;
          span {
            border: 1px solid #589daf;
            color: #589daf;
            position: relative;
            display: inline-block;
            padding: 0 3px;
            line-height: 0.3rem;
            height: 0.3rem;
            border-radius: 2px;
            font-size: 0.26rem;
            margin-right: 0.1rem;
          }
          .featrue {
            color: #f90;
            border-color: #f90;
          }
        }
      }
      .distance {
        font-size: 0.26rem;
        color: #999;
      }
    }
  }
}
</style>





